

namespace StateTheaterDataModel
{
    using System.Data.Linq;
    using System.Data.Linq.Mapping;
    using System.Data;
    using System.Reflection;

	partial class StateTheaterDataContext
	{

		[Function(Name = "dbo.DegreesSeparation")]
		public ISingleResult<DegreesSeparationResult> DegreesSeparation([Parameter(Name = "FROM", DbType = "Int")] System.Nullable<int> fROM, [Parameter(Name = "TO", DbType = "Int")] System.Nullable<int> tO)
		{
			IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), fROM, tO);
			return ((ISingleResult<DegreesSeparationResult>)(result.ReturnValue));
		}

		public partial class DegreesSeparationResult
		{
			// [Level], FromId, FromName, ProdId, Title, Troupe, ToId, ToName 
			private int _Level;
			private int _FromId;
			private string _FromName;
			private int _ProdId;
			private string _Title;
			private string _Troupe;
			private int _ToId;
			private string _ToName;

			public DegreesSeparationResult()
			{
			}

			[Column(Storage = "_Level", DbType = "Int NOT NULL")]
			public int Level
			{
				get
				{
					return this._Level;
				}
				set
				{
					if ((this._Level != value))
					{
						this._Level = value;
					}
				}
			}

			[Column(Storage = "_FromId", DbType = "Int NOT NULL")]
			public int FromId
			{
				get
				{
					return this._FromId;
				}
				set
				{
					if ((this._FromId != value))
					{
						this._FromId = value;
					}
				}
			}

			[Column(Storage = "_FromName", DbType = "NVarChar(50)")]
			public string FromName
			{
				get
				{
					return this._FromName;
				}
				set
				{
					if ((this._FromName != value))
					{
						this._FromName = value;
					}
				}
			}

			[Column(Storage = "_ProdId", DbType = "Int NOT NULL")]
			public int ProdId
			{
				get
				{
					return this._ProdId;
				}
				set
				{
					if ((this._ProdId != value))
					{
						this._ProdId = value;
					}
				}
			}

			[Column(Storage = "_Title", DbType = "NVarChar(50)")]
			public string Title
			{
				get
				{
					return this._Title;
				}
				set
				{
					if ((this._Title != value))
					{
						this._Title = value;
					}
				}
			}

			[Column(Storage = "_Troupe", DbType = "NVarChar(50)")]
			public string Troupe
			{
				get
				{
					return this._Troupe;
				}
				set
				{
					if ((this._Troupe != value))
					{
						this._Troupe = value;
					}
				}
			}

			[Column(Storage = "_ToId", DbType = "Int NOT NULL")]
			public int ToId
			{
				get
				{
					return this._ToId;
				}
				set
				{
					if ((this._ToId != value))
					{
						this._ToId = value;
					}
				}
			}

			[Column(Storage = "_ToName", DbType = "NVarChar(50)")]
			public string ToName
			{
				get
				{
					return this._ToName;
				}
				set
				{
					if ((this._ToName != value))
					{
						this._ToName = value;
					}
				}
			}
		}
	}
}
